home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_SplitList Tcl Command Language Library Tcl_SplitList
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Tcl_SplitList - break a Tcl list up into fields
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ttccll..hh>>
-
- int
- TTccll__SSpplliittLLiisstt(_i_n_t_e_r_p, _l_i_s_t, _a_r_g_c_P_t_r, _a_r_g_v_P_t_r)
-
- AARRGGUUMMEENNTTSS
- Tcl_Interp *_i_n_t_e_r_p (out) Interpreter to use for
- error reporting.
-
- char *_l_i_s_t (in) Pointer to a string with
- proper list structure.
-
- int *_a_r_g_c_P_t_r (out) Filled in with number of
- elements in _l_i_s_t.
-
- char ***_a_r_g_v_P_t_r (out) *_a_r_g_v_P_t_r will be filled in
- with the address of an
- array of pointers to the
- strings that are the
- extracted elements of
- _l_i_s_t. There will be
- *_a_r_g_c_P_t_r valid entries in
- the array.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- TTccll__SSpplliittLLiisstt is the inverse of TTccll__MMeerrggee. Given a list, it
- extracts all of the elements of the list and returns an
- array of pointers to them using _a_r_g_c_P_t_r and _a_r_g_v_P_t_r. While
- extracting the arguments, TTccll__SSpplliittLLiisstt obeys the usual
- rules for backslash substitutions and braces. The area of
- memory pointed to by *_a_r_g_v_P_t_r is dynamically allocated; in
- addition to the array of pointers, it also holds copies of
- all the list elements. It is the caller's responsibility to
- free up all of this storage by calling
-
- free((char *) *_a_r_g_v_P_t_r)
- when the list elements are no longer needed.
-
- TTccll__SSpplliittLLiisstt normally returns TTCCLL__OOKK, which means the list
- was successfully parsed. If there was a syntax error in
- _l_i_s_t, then TTCCLL__EERRRROORR is returned and _i_n_t_e_r_p->_r_e_s_u_l_t will
- point to an error message describing the problem.
-
-
-
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 1
-
-
-
-
-
-
- Tcl_SplitList Tcl Command Language Library Tcl_SplitList
-
-
-
- KKEEYYWWOORRDDSS
- list, split, strings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: May 31, 1991 2
-
-
-
-